// EJS 模板字符串
const templates = {
    replyText: (FromUserName, ToUserName, Content) => `
        <xml>
            <ToUserName><![CDATA[${FromUserName}]]></ToUserName>
            <FromUserName><![CDATA[${ToUserName}]]></FromUserName>
            <CreateTime>${Date.now()}</CreateTime>
            <MsgType><![CDATA[text]]></MsgType>
            <Content><![CDATA[${Content}]]></Content>
        </xml>
    `,
    replyImage: (FromUserName, ToUserName, MediaId) => `
        <xml>
            <ToUserName><![CDATA[${FromUserName}]]></ToUserName>
            <FromUserName><![CDATA[${ToUserName}]]></FromUserName>
            <CreateTime>${Date.now()}</CreateTime>
            <MsgType><![CDATA[image]]></MsgType>
            <Image>
                <MediaId><![CDATA[${MediaId}]]></MediaId>
            </Image>
        </xml>
    `,
    replyVoice: (FromUserName, ToUserName, MediaId) => `
        <xml>
            <ToUserName><![CDATA[${FromUserName}]]></ToUserName>
            <FromUserName><![CDATA[${ToUserName}]]></FromUserName>
            <CreateTime>${Date.now()}</CreateTime>
            <MsgType><![CDATA[voice]]></MsgType>
            <Voice>
                <MediaId><![CDATA[${MediaId}]]></MediaId>
            </Voice>
        </xml>
    `,
    replyVideo: (FromUserName, ToUserName, MediaId) => `
        <xml>
            <ToUserName><![CDATA[${FromUserName}]]></ToUserName>
            <FromUserName><![CDATA[${ToUserName}]]></FromUserName>
            <CreateTime>${Date.now()}</CreateTime>
            <MsgType><![CDATA[video]]></MsgType>
            <Video>
                <MediaId><![CDATA[${MediaId}]]></MediaId>
                <Title><![CDATA[视频标题]]></Title>
                <Description><![CDATA[视频描述]]></Description>
            </Video>
        </xml>
    `,
    replyLocation: (FromUserName, ToUserName, Location_X, Location_Y) => `
        <xml>
            <ToUserName><![CDATA[${FromUserName}]]></ToUserName>
            <FromUserName><![CDATA[${ToUserName}]]></FromUserName>
            <CreateTime>${Date.now()}</CreateTime>
            <MsgType><![CDATA[text]]></MsgType>
            <Content><![CDATA[你发送了地理位置，坐标: ${Location_X}, ${Location_Y}]]></Content>
        </xml>
    `,
    replyLink: (FromUserName, ToUserName, Title, Description, Url) => `
        <xml>
            <ToUserName><![CDATA[${FromUserName}]]></ToUserName>
            <FromUserName><![CDATA[${ToUserName}]]></FromUserName>
            <CreateTime>${Date.now()}</CreateTime>
            <MsgType><![CDATA[text]]></MsgType>
            <Content><![CDATA[你分享了链接: ${Title} - ${Description}, 地址: ${Url}]]></Content>
        </xml>
    `,
};

exports.templates = templates;

